<?php if ($page != "link" && $page != "hops" && $page != "avg" ) exit(1); ?>
<form name="<?php echo $page; ?>" action="./" method="get">

<div id="feature">
<input type="hidden" name="q" value="<?php echo $page; ?>">
<?php require_once("form_$page.php"); ?>
</div>

<div id="works" class="form-section">
People working as:
<input type="checkbox" name="work[]" value="Actor"<?php echo ((isset($_GET["work"]) && in_array("Actor",$_GET["work"])) ?  "checked=\"checked\"" : ""); ?>/>Actor
<input type="checkbox" name="work[]" value="Director"<?php echo ((!isset($_GET["work"]) || in_array("Director",$_GET["work"])) ? "checked=\"checked\"" : ""); ?>/>Director
<input type="checkbox" name="work[]" value="Producer"<?php echo ((!isset($_GET["work"]) || in_array("Producer",$_GET["work"])) ? "checked=\"checked\"" : ""); ?>/>Producer
<input type="checkbox" name="work[]" value="Writer"<?php echo ((!isset($_GET["work"]) || in_array("Writer",$_GET["work"])) ? "checked=\"checked\"" : ""); ?>/>Writer
</div>

<div id="years" class="form-section">
Titles released from <input type="text" name="minyear" value="<?php echo $miny; ?>"/> to <input type="text" name="maxyear" value="<?php echo $maxy; ?>"/>
</div>

<div id="suspended" class="form-section">
Use suspended titles:
</div>

<div id="media" class="form-section">
Titles released as:
<input type="checkbox" name="media[]" value="Movie"<? echo ( (!isset($_GET["media"]) || in_array("Movie", $_GET["media"])) ?  "checked=\"checked\"" : ""); ?>/>Movie
<input type="checkbox" name="media[]" value="TV Movie"<? echo ((isset($_GET["media"]) && in_array("TV Movie", $_GET["media"])) ? "checked=\"checked\"" : ""); ?>/>TV Movie or show
<input type="checkbox" name="media[]" value="TV Show"<? echo ((isset($_GET["media"]) && in_array("TV Show", $_GET["media"])) ? "checked=\"checked\"" : ""); ?>/>TV Serie
<input type="checkbox" name="media[]" value="Video"<? echo ((isset($_GET["media"]) && in_array("Video", $_GET["media"])) ? "checked=\"checked\"" : ""); ?>/>Video
<input type="checkbox" name="media[]" value="Video Game"<? echo ((isset($_GET["media"]) && in_array("Video Game", $_GET["media"])) ? "checked=\"checked\"" : ""); ?>/>Video Game
</div>

<div id="genres" class="form-section">
Using genres:
<table  width="700" border="0" align="center">
  <tr>
    <td width="20%"><input type="checkbox" name="genre[]" value="Action" <?php if( !isset($_GET["genre"]) || in_array("Action",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Action</td>
    <td width="20%"><input type="checkbox" name="genre[]" value="Crime" <?php if( !isset($_GET["genre"]) || in_array("Crime",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Crime</td>
    <td width="20%"><input type="checkbox" name="genre[]" value="Game-Show" <?php if( isset($_GET["genre"]) && in_array("Game-Show",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Game-Show</td>
    <td width="20%"><input type="checkbox" name="genre[]" value="News" <?php if( isset($_GET["genre"]) && in_array("News",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />News</td>
    <td width="20%"><input type="checkbox" name="genre[]" value="Talk-Show" <?php if( isset($_GET["genre"]) && in_array("Talk-Show",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Talk-Show</td>
  </tr>
  <tr>
    <td><input type="checkbox" name="genre[]" value="Adventure" <?php if( !isset($_GET["genre"]) || in_array("Adventure",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Adventure</td>
    <td><input type="checkbox" name="genre[]" value="Documentary" <?php if( !isset($_GET["genre"]) || in_array("Documentary",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Documentary</td>
    <td><input type="checkbox" name="genre[]" value="History" <?php if( !isset($_GET["genre"]) || in_array("History",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>History</td>
    <td><input type="checkbox" name="genre[]" value="Reality-TV" <?php if( isset($_GET["genre"]) && in_array("Reality-TV",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Reality-TV</td>
    <td><input type="checkbox" name="genre[]" value="Thriller" <?php if( !isset($_GET["genre"]) || in_array("Thriller",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?> />Thriller</td>
  </tr>
  <tr>
    <td><input type="checkbox" name="genre[]" value="Adult" <?php if( !isset($_GET["genre"]) || in_array("Adult",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Adult</td>
    <td><input type="checkbox" name="genre[]" value="Drama" <?php if( !isset($_GET["genre"]) || in_array("Drama",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Drama</td>
    <td><input type="checkbox" name="genre[]" value="Horror" <?php if( !isset($_GET["genre"]) || in_array("Horror",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Horror</td>
    <td><input type="checkbox" name="genre[]" value="Romance" <?php if( !isset($_GET["genre"]) || in_array("Romance",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Romance</td>
    <td><input type="checkbox" name="genre[]" value="War" <?php if( !isset($_GET["genre"]) || in_array("War",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>War</td>
  </tr>
  <tr>
    <td><input type="checkbox" name="genre[]" value="Animation" <?php if( !isset($_GET["genre"]) || in_array("Animation",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Animation</td>
    <td><input type="checkbox" name="genre[]" value="Family" <?php if( !isset($_GET["genre"]) || in_array("Family",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Family</td>
    <td><input type="checkbox" name="genre[]" value="Music" <?php if( isset($_GET["genre"]) && in_array("Music",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Music</td>
    <td><input type="checkbox" name="genre[]" value="Sci-Fi" <?php if( !isset($_GET["genre"]) || in_array("Sci-Fi",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Sci-Fi</td>
    <td><input type="checkbox" name="genre[]" value="Western" <?php if( !isset($_GET["genre"]) || in_array("Western",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Western</td>
  </tr>
  <tr>
    <td><input type="checkbox" name="genre[]" value="Biography" <?php if( !isset($_GET["genre"]) || in_array("Biography",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Biography</td>
    <td><input type="checkbox" name="genre[]" value="Fantasy" <?php if( !isset($_GET["genre"]) || in_array("Fantasy",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Fantasy</td>
    <td><input type="checkbox" name="genre[]" value="Musical" <?php if( !isset($_GET["genre"]) || in_array("Musical",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Musical</td>
    <td><input type="checkbox" name="genre[]" value="Short" <?php if( !isset($_GET["genre"]) || in_array("Short",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Short</td>
    <td><input type="checkbox" name="genre[]" value="Unknown" <?php if( isset($_GET["genre"]) && in_array("Unknown",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Unknown</td>
  </tr>
  <tr>
    <td><input type="checkbox" name="genre[]" value="Comedy" <?php if( !isset($_GET["genre"]) || in_array("Comedy",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Comedy</td>
    <td><input type="checkbox" name="genre[]" value="Film-Noir" <?php if( !isset($_GET["genre"]) || in_array("Film-Noir",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Film-Noir</td>
    <td><input type="checkbox" name="genre[]" value="Mystery" <?php if( !isset($_GET["genre"]) || in_array("Mystery",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Mystery</td>
    <td><input type="checkbox" name="genre[]" value="Sport" <?php if( isset($_GET["genre"]) && in_array("Sport",$_GET["genre"]) ) echo 'checked="yes"'; else 'checked=""';?>/>Sport</td>
    <td>&nbsp;</td>
  </tr>
</table>
</div>

<div id="submit" class="form-section"><input type="submit" value="Find"/></div>
</form>
